package exception;

import java.sql.SQLOutput;

public class FinallyDemo {
    public static void main(String[] args) {
        System.out.println("开始");
        try{
            String str = "null";
            String  str2 = null;
            System.out.println(str.length());
            System.out.println(str.charAt(5));
        }catch(Exception e){
            System.out.println("异常");
        }finally{
            System.out.println("finally");
        }
    }
}
